package com.zone.vehicle.sdk.module.superapp;

import com.zone.sdk.common.http.base.Result;
import com.zone.vehicle.sdk.module.superapp.request.AppsDownloadRequest;
import com.zone.vehicle.sdk.module.superapp.request.AppsUploadRequest;
import com.zone.vehicle.sdk.module.superapp.request.SyncStatusRequest;

import io.reactivex.Observable;
import okhttp3.ResponseBody;
import retrofit2.http.Body;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Streaming;

public interface ISuperAppCloudService {



    /**
     * 下载文件用
     * @param request
     * @return
     */
    @Streaming //添加这个注解用来下载大文件
    @POST("aps/apps/download")
    Observable<ResponseBody> appsDownload(@Body AppsDownloadRequest request);


    /**
     * 应用状态上报
     * @param request
     * @return
     */
    @POST("aps/sync/status")
    Observable<Result<Result>> syncStatus(@Body SyncStatusRequest request);

    @Multipart
    @POST("apps/upload")
    Observable<Result<Result>> appsUpload(@Body AppsUploadRequest request);

//    Observable<BaseResponse<AppsUpdateListResponse>> appsUpload(@Body AppsUploadRequest request, @Part MultipartBody.Part file);


//    @Headers({"Content-Type: application/json;charset=utf-8",
//            "Accept: application/json;charset=utf-8"})
//    @POST("user/captchacert/exchange/v1")
//    Observable<Result<Result>> captchacertExchange(@Body BaseRequest request);



}
